package jhlee42;

import java.util.Scanner;

public class ch02ex111_3 {
	public static void main(String[] args) {
		
		int money;
		int w50000;
		int w10000;
		int w5000;
		int w1000;
		int w500;
		int w100;
		int w50;
		int w10;
		int w1;

		Scanner sc;

		sc = new Scanner(System.in);

		System.out.println("돈을 기입하세요..");
		money = sc.nextInt();
		
		// 50000
		w50000 = money / 50000;
		money = money % 50000;
		
		// 10000
		w10000 = money / 10000;
		money = money % 10000;
		
		// 5000
//		w5000 = money / 5000;
//		money = money % 5000;
		
		// 1000
		w1000 = money / 1000;
		money = money % 1000;
		
		// 500
		w500 = money / 500;
		money = money % 500;
		
		// 100
		w100 = money / 100;
		money = money % 100;
		
		// 50
		w50 = money / 50;
		money = money % 50;
		
		// 10
		w10 = money / 10;
		money = money % 10;
		
		// 1
		w1 = money / 10;
		money = money % 10;		
		

		System.out.println("5만원은 "+ w50000 + " 개" );
		System.out.println("1만원은 "+ w10000 + " 개" );
//		System.out.println("5천원은 "+ w5000  + " 개" );
		System.out.println("1천원은 "+ w1000  + " 개" );
		System.out.println("오백원은 "+ w500   + " 개" );
		System.out.println("백원은   "+ w100   + " 개" );
		System.out.println("오십원은 "+ w50    + " 개" );
		System.out.println("십원      "+ w10    + " 개" );
		System.out.println("일원      "+ w1     + " 개" );
		
		sc.close();
		
		

	}
}
